using System.ComponentModel;

namespace ThreadingPrimeNumberSample
{
    public class Notifier : LeakDebugger, INotifyPropertyChanged
    {
        // Simplifies event raising in a thread safe way
        // see: http://www.ryanvice.net/c/simplified-event-raising-pattern-in-c/
        public event PropertyChangedEventHandler PropertyChanged = delegate{};

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChanged(this,
                            new PropertyChangedEventArgs(
                                propertyName));
        }
    }
}